﻿namespace NuGetCop.MSBuild.Tasks.Configuration
{
    using System.Xml.Serialization;
    using NuGetCop.MSBuild.Tasks.Configuration.Schema;

    [XmlRoot("settings", Namespace = SchemaSpecification.Namespace)]
    public sealed class NuGetCopSettings
    {
        public NuGetCopSettings()
        {
            SchemaVersion = SchemaSpecification.CurrentVersion;
        }

        [XmlAttribute("version")]
        public int SchemaVersion { get; set; }

        [XmlArray("rules")]
        [XmlArrayItem("rule", Type = typeof(NuGetCopRuleSettings))]
        public NuGetCopRuleSettings[] Rules { get; set; }
    }
}
